<?php
/**
 * @version $Id: dwoo_cobweb_template_adapter.class.php 5 2010-02-03 09:53:37Z oystein.rg $
 * @licence http://www.opensource.org/licenses/bsd-license.php The BSD License
 * @copyright Upstruct Berlin Oslo
 */

require_once DWOO_APPLICATION_DIRECTORY . '/templating/dwoo_plugins.inc.php';

/**
 * @author     Øystein Riiser Gundersen <oystein@upstruct.com>
 * @package    Dwoo Template Adapter
 * @version    $Revision: 5 $
 */
class DwooCobwebTemplateAdapter extends TemplateAdapter {
	
	private $dwoo;
	private static $template_directories = NULL;
	
	public function __construct() {
		$this->dwoo = new DwooCobwebTemplate();
		parent::__construct();
	}
	
	public function interpolate($template, $interpolation_mode = TemplateAdapter::INTERPOLATE_FILE) {
		$file = new Dwoo_Template_File($template, NULL, NULL, NULL, Template::templateDirectories());

		return $this->dwoo->get($file, $this->bindings());
	}
}